.class Lcom/burstly/lib/component/AdaptorFactoryWrapper;
.super Ljava/lang/Object;
.source "AdaptorFactoryWrapper.java"

# interfaces
.implements Lcom/burstly/lib/feature/networks/IAdaptorFactory;


# static fields
.field private static final LOG:Lcom/burstly/lib/util/LoggerExt;

.field private static final TAG:Ljava/lang/String;


# instance fields
.field private final mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

.field private mInitialized:Z


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 34
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->LOG:Lcom/burstly/lib/util/LoggerExt;

    .line 39
    const-class v0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->TAG:Ljava/lang/String;

    return-void
.end method

.method constructor <init>(Lcom/burstly/lib/feature/networks/IAdaptorFactory;)V
    .locals 0
    .parameter "factory"

    .prologue
    .line 56
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 57
    iput-object p1, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

    .line 58
    return-void
.end method


# virtual methods
.method public createAdaptor(Ljava/util/Map;)Lcom/burstly/lib/component/IBurstlyAdaptor;
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;)",
            "Lcom/burstly/lib/component/IBurstlyAdaptor;"
        }
    .end annotation

    .prologue
    .line 71
    .local p1, params:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;*>;"
    iget-object v0, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

    invoke-interface {v0, p1}, Lcom/burstly/lib/feature/networks/IAdaptorFactory;->createAdaptor(Ljava/util/Map;)Lcom/burstly/lib/component/IBurstlyAdaptor;

    move-result-object v0

    return-object v0
.end method

.method public destroy()V
    .locals 1

    .prologue
    .line 76
    iget-object v0, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

    invoke-interface {v0}, Lcom/burstly/lib/feature/networks/IAdaptorFactory;->destroy()V

    .line 77
    return-void
.end method

.method public initialize(Ljava/util/Map;)V
    .locals 7
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation

    .prologue
    .local p1, params:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;*>;"
    const/4 v6, 0x1

    .line 62
    iget-boolean v0, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mInitialized:Z

    if-nez v0, :cond_0

    .line 63
    sget-object v0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v1, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->TAG:Ljava/lang/String;

    const-string v2, "Initializing {0}"

    new-array v3, v6, [Ljava/lang/Object;

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 64
    iget-object v0, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mFactory:Lcom/burstly/lib/feature/networks/IAdaptorFactory;

    invoke-interface {v0, p1}, Lcom/burstly/lib/feature/networks/IAdaptorFactory;->initialize(Ljava/util/Map;)V

    .line 65
    iput-boolean v6, p0, Lcom/burstly/lib/component/AdaptorFactoryWrapper;->mInitialized:Z

    .line 67
    :cond_0
    return-void
.end method
